<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js</title>
</head>
<body>
    <!--
        js用来前端交互
        弱类型编程语言
        类型number string boolean  undefined NaN
    -->
    <script type="text/javascript">
        var name = 'datou'
        let str = "喜欢吃冰淇淋"
        //alert(name+str)
        document.write(name+str+"<br>")

        var x = 12.34
        var y = 12
        var z = '吴宏保啥时候回来'

        document.write(x+"<br>")
        document.write(y+"<br>")
        document.write(z+"<br>")
        document.writeln(typeof x +"<br>")
        document.writeln(typeof z)

        document.write("<hr>")

        let x1 = "局部变量let"
        document.write(x1+"<br>")
        var y1 = "全局变量var"
        document.write(y1+"<br>")
        const z1 = "常量const"
        document.write(z1+"<br>")
        x = undefined
        document.write(x+"<br>")
        document.write(typeof x+"<br>")
        let da
        document.write(typeof da+"<br>")
        let tou = true
        document.write(typeof tou+"<br>")
        document.write(Number("12dsnakda")+"<br>")


    </script>

</body>
</html>
